Skip to content

deps: bump uart_16550 to 0.8.0 + fix UEFI weirdness - #580

Open
phip1611 wants to merge 4 commits into
rust-osdev:mainfrom
phip1611:bump-uart
Open

deps: bump uart_16550 to 0.8.0 + fix UEFI weirdness#580
phip1611 wants to merge 4 commits into
rust-osdev:mainfrom
phip1611:bump-uart

Conversation

@phip1611

@phip1611 phip1611 commented Aug 15, 2026

Copy link
Copy Markdown
Member

This PR upgrades the bootloader to uart_16550 0.8.0, bringing its modernized, real-hardware-focused UART driver into the project now that the upstream regression is resolved.

Alongside the API migration, the UEFI path explicitly disconnects the UEFI console from the serial device before initializing the bootloader logger. This gives the logger exclusive ownership of the UART, preventing conflicting device access and avoiding UEFI console output being duplicated on the serial port.

Some context for some weirdness that @Freax13 found in an earlier PR (#565 (comment)):

  • By default I enabled some interrupts in the Config of the Uart16550
  • As UEFI was driving the device, interrupts were firing before init() was finished
  • Now:
    • UEFI does no longer take ownership over the device (good)
    • even if it would, the default config now doesn't activate any interrupts of the device (also good, as not needed here)

Testing

I tested the crate on real hardware (rust-osdev/uart_16550#71) but not the bootloader crate. If you give me instructions for how to test it best without much effort, it would be highly appreciated.

@phip1611
phip1611 requested review from Freax13 and phil-opp August 15, 2026 09:03
@phip1611 phip1611 self-assigned this Aug 15, 2026
@phip1611
phip1611 marked this pull request as draft August 15, 2026 09:25
@Freax13

This comment was marked as outdated.

@phip1611

This comment was marked as outdated.

To properly use `Uart16550::init()`, we need to have full ownership of the
serial device. Otherwise, there is undefined runtime behavior caused by the
interaction with the UEFI console driver that also claims ownership of the
device.

This is needed to replace our own serial logger with the Uart16550Tty type
of the uart_16550 crate. It ensures much clearer separations of concerns and
ensures this crate can log reliably on a variety of real hardware.
@phip1611 phip1611 changed the title Reapply "deps: bump uart_16550 to 0.6.0" + bump to 0.7.0 deps: bump uart_16550 to 0.8.0 + fix UEFI weirdness Aug 16, 2026
@phip1611
phip1611 marked this pull request as ready for review August 16, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants